/*
 * Copyright (C) 2009 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.lgiavedoni.frank.view;

import org.lgiavedoni.android.franq.FrankMain;
import org.lgiavedoni.android.franq.service.communication.CommunicationService;
import org.lgiavedoni.android.franq.service.phone.ContextService;
import org.lgiavedoni.android.franq.util.implementation.ImplementationUtil;
import org.lgiavedoni.frank.view.service.FrankService;

import android.app.PendingIntent;
import android.app.Service;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.IBinder;
import android.widget.RemoteViews;

/**
 * Define a simple widget that shows the Wiktionary "Word of the day." To build
 * an update we spawn a background {@link Service} to perform the API queries.
 */
public class WordWidget extends AppWidgetProvider {
	private final static String flag = "flag";
 
    @Override
    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
             context.startService(new Intent(context, FrankService.class));
    }
    
    @Override
	public void onDeleted(Context context, int[] appWidgetIds) {
    	CommunicationService.inst.sendDefaultTextMessage("onDeleted");
		super.onDeleted(context, appWidgetIds);
	}

	@Override
	public void onEnabled(Context context) {
		CommunicationService.inst.sendDefaultTextMessage("onEnabled");
		super.onEnabled(context);
	}

	@Override
	public void onDisabled(Context context) {
		CommunicationService.inst.sendDefaultTextMessage("onDisabled");
		super.onDisabled(context);
	}

	
}
